package demo.logger;

import org.apache.log4j.*;

import demo.dbconnection.DBConnection;

public class LoggerHelper
{
	private static Logger log;
	static
	{
		// 创建日志类
		log = Logger.getLogger(LoggerHelper.class.getName());
		// 加载log4j配置文件
		PropertyConfigurator.configure("src/demo/config/log4j.properties");
	}

	public static void debug(String className, String message)
	{
		log = Logger.getLogger(className);
		log.debug(message);
	}

	public static void info(String className, String message)
	{
		log = Logger.getLogger(className);
		log.info(message);
	}

	public static void error(String className, String message)
	{
		log = Logger.getLogger(className);
		log.error(message);
	}

}
